package com.blue.core.dict;

import com.blue.core.dict.annotation.Dict;

/**
 * 上传文件状态
 * 
 * @author zhengj
 * @since 1.0 2017年1月14日
 */
@Dict
public enum UploadState
{
	NOT_UPLOAD(0, "未上传", Color.RED),
	UPLOADED(1, "已上传", Color.BLUE);
	
	private Integer index;
	private String name;
	private Color color;
	
	UploadState(Integer index, String name, Color color)
	{
		this.index = index;
		this.name = name;
		this.color = color;
	}

	public Integer getIndex()
	{
		return index;
	}

	public String getName()
	{
		return name;
	}

	public Color getColor()
	{
		return color;
	}

	@Override
	public String toString()
	{
		return String.format("<span style=\"color: %s;\">%s</span>", color.name().toLowerCase(), name);
	}

}
